Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.pacist.diamonds.ProgressBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--com.pacist.diamonds.DiamondCanvas
                    |
                    +--com.pacist.diamonds.Controller
                          |
                          +--com.pacist.diamonds.LinearController
                                |
                                +--com.pacist.diamonds.ProgressBar

public class ProgressBar
extends LinearController
Implements a progress bar component.

See Also:
Serialized Form

Fields inherited from class com.pacist.diamonds.LinearController
hasPeer, HORIZONTAL, orientation, thumbSize, trackRect, valueRect, VERTICAL
 
Fields inherited from class com.pacist.diamonds.Controller
canMeasure, listeners, maxValue, minValue, postOnMouseDown, postWhileDragging, showValue, value
 
Fields inherited from class com.pacist.diamonds.DiamondCanvas
tipText
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ProgressBar()
          Creates and initializes a ProgressBar object.
 
Method Summary
java.awt.Color getProgressColor()
          Gets the progress bar color.
java.awt.Rectangle getThumbRect()
          Returns the dimensions of the Thumb rectangle.
java.awt.Color getValInProgressColor()
          Return the color of the Value when the progress bar is drawn over it.
java.awt.Color getValInSpaceColor()
          Return the color of the Value when the progress bar is not drawn over it.
boolean getValueColorSwap()
          Determines whether the the ProgressBar is using the ValInProgressColor and ValInSpaceColor colors.
void layoutAreas()
          Performs the necessary operations to lay out the ProgressBar.
void paint(java.awt.Graphics g)
          This method is called to repaint the ProgressBar.
void paintThumb(java.awt.Graphics g)
          Draws the thumb part of the slider.
void paintTrack(java.awt.Graphics g)
          Draws the track part of the slider.
void paintValue(java.awt.Graphics g)
          Draws the value of the slider.
void repaintPostValueChange(java.awt.Rectangle oldThumb, java.awt.Rectangle newThumb)
          This method is called whenever the value of the ProgressBar changes.
void setProgressColor(java.awt.Color c)
          Sets the color of the progress bar.
void setValInProgressColor(java.awt.Color c)
          Sets the color of the Value when the progress bar is being drawn over it.
void setValInSpaceColor(java.awt.Color c)
          Sets the color of the Value when the process bar is not drawn over it.
void setValueColorSwap(boolean b)
          Determines whether the alternative ValInProgressColor and ValInSpaceColor colors should be used.
 
Methods inherited from class com.pacist.diamonds.LinearController
addNotify, doValueAtEndLayout, getMinimumSize, getOrientation, getPreferredSize, getThumbRect, getTrackRect, getValueColor, getValuePos, getValueRect, layoutAreas, minimumSize, paint, paintThumb, paintTrack, paintValue, paintValueOneColor, pointToValue, preferredSize, repaintPostValueChange, setBounds, setOrientation, setValue, valueToX
 
Methods inherited from class com.pacist.diamonds.Controller
addControllerListener, getMaxValue, getMinValue, getPostOnMouseDown, getShowValue, getValue, getValueString, isMaxAtBottom, mouseDragged, mousePressed, mouseReleased, notifyValueChange, pinValue, pointToValue, processMouseEvent, processMouseMotionEvent, removeControllerListener, setMaxAtBottom, setMaxValue, setMinValue, setPostOnMouseDown, setShowValue, setValue
 
Methods inherited from class com.pacist.diamonds.DiamondCanvas
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText
 
Methods inherited from class java.awt.Canvas
addNotify, paint
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

ProgressBar

public ProgressBar()
Creates and initializes a ProgressBar object.
Method Detail

getProgressColor

public java.awt.Color getProgressColor()
Gets the progress bar color.
Returns:
Color - the color of the progress bar.

setProgressColor

public void setProgressColor(java.awt.Color c)
Sets the color of the progress bar.

getValInSpaceColor

public java.awt.Color getValInSpaceColor()
Return the color of the Value when the progress bar is not drawn over it.

setValInSpaceColor

public void setValInSpaceColor(java.awt.Color c)
Sets the color of the Value when the process bar is not drawn over it.

getValInProgressColor

public java.awt.Color getValInProgressColor()
Return the color of the Value when the progress bar is drawn over it.

setValInProgressColor

public void setValInProgressColor(java.awt.Color c)
Sets the color of the Value when the progress bar is being drawn over it.

getValueColorSwap

public boolean getValueColorSwap()
Determines whether the the ProgressBar is using the ValInProgressColor and ValInSpaceColor colors.
Returns:
boolean - true if it is; false otherwise.

setValueColorSwap

public void setValueColorSwap(boolean b)
Determines whether the alternative ValInProgressColor and ValInSpaceColor colors should be used.
Parameters:
b - true the alternative colors are used; false otherwise.

repaintPostValueChange

public void repaintPostValueChange(java.awt.Rectangle oldThumb,
                                   java.awt.Rectangle newThumb)
This method is called whenever the value of the ProgressBar changes.
Parameters:
oldThumb - thumb coordinates before change
newThumb - thumb coordinates after change
Overrides:
repaintPostValueChange in class LinearController

getThumbRect

protected java.awt.Rectangle getThumbRect()
Returns the dimensions of the Thumb rectangle.
Overrides:
getThumbRect in class LinearController

paintValue

protected void paintValue(java.awt.Graphics g)
Draws the value of the slider. Override to provide a different look to the slider.
Parameters:
g - the graphics context.
Overrides:
paintValue in class LinearController

layoutAreas

protected void layoutAreas()
Performs the necessary operations to lay out the ProgressBar.
Overrides:
layoutAreas in class LinearController

paintTrack

protected void paintTrack(java.awt.Graphics g)
Draws the track part of the slider. Override to provide a different look to the slider.
Parameters:
g - the graphics context.
size - the size of the ProgressBar.
Overrides:
paintTrack in class LinearController

paintThumb

protected void paintThumb(java.awt.Graphics g)
Draws the thumb part of the slider. Override to provide a different look to the slider.
Parameters:
g - the graphics context.
size - the size of the ProgressBar.
Overrides:
paintThumb in class LinearController

paint

public void paint(java.awt.Graphics g)
This method is called to repaint the ProgressBar.
Parameters:
g - the graphics context.
Overrides:
paint in class LinearController

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD